package com.prb.ip.filter.common;


public class IpHolder {

    ThreadLocal<String> ipContext = new ThreadLocal<>();

    public static IpHolder self = new IpHolder();

    // 存放ip
    public void putIp(String ip) {

        ipContext.set(ip);
    }

    //去ip
    public String getIp() {

        return ipContext.get();
    }

    //移除 本地线程 IP
    public void removeIp(){

        ipContext.remove();
    }

}
